package com.example.designpattern.decorator;

//由于装饰器模式可以自由组合,所以优于写死的子类继承
public class DecoratorPatternTest {
    public static void main(String[] args) {
        Person person=new Programmer();
        person=new ProgrammerDecoratorSpring(person);
        person=new ProgrammerDecoratorMybatis(person);
        person.know();
    }
}
